package com.bt.dmdb.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "ODS_PROP_SITE_MILESTONE")
@SuppressWarnings("serial")
public class PropSiteMilestone implements java.io.Serializable {

    private long id;
    private PropSite propSite;
    private ProjectSite projectSite;
    private Long milestoneId;
    private Long orderRef;
    private String contactName;
    private String milestoneStatus;
    private Date plannedStartDate;
    private Date plannedEndDate;
    private String plannedDuration;
    private Date actualStartDate;
    private Date actualEndDate;

    public PropSiteMilestone() {
    }

    public PropSiteMilestone(long id) {
        this.id = id;
    }

    public PropSiteMilestone(long id, PropSite propSite, ProjectSite projectSite, Long milestoneId, Long orderRef, String contactName, String milestoneStatus, Date plannedStartDate, Date plannedEndDate, String plannedDuration, Date actualStartDate, Date actualEndDate) {
        this.id = id;
        this.propSite = propSite;
        this.projectSite = projectSite;
        this.milestoneId = milestoneId;
        this.orderRef = orderRef;
        this.contactName = contactName;
        this.milestoneStatus = milestoneStatus;
        this.plannedStartDate = plannedStartDate;
        this.plannedEndDate = plannedEndDate;
        this.plannedDuration = plannedDuration;
        this.actualStartDate = actualStartDate;
        this.actualEndDate = actualEndDate;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false, precision = 10, scale = 0)
    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PROP_SITE_ID")
    public PropSite getPropSite() {
        return this.propSite;
    }

    public void setPropSite(PropSite propSite) {
        this.propSite = propSite;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PROJECT_SITE_ID")
    public ProjectSite getProjectSite() {
        return this.projectSite;
    }

    public void setProjectSite(ProjectSite projectSite) {
        this.projectSite = projectSite;
    }

    @Column(name = "MILESTONE_ID", precision = 10, scale = 0)
    public Long getMilestoneId() {
        return this.milestoneId;
    }

    public void setMilestoneId(Long milestoneId) {
        this.milestoneId = milestoneId;
    }

    @Column(name = "ORDER_REF", precision = 10, scale = 0)
    public Long getOrderRef() {
        return this.orderRef;
    }

    public void setOrderRef(Long orderRef) {
        this.orderRef = orderRef;
    }

    @Column(name = "CONTACT_NAME", length = 50)
    public String getContactName() {
        return this.contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    @Column(name = "MILESTONE_STATUS", length = 20)
    public String getMilestoneStatus() {
        return this.milestoneStatus;
    }

    public void setMilestoneStatus(String milestoneStatus) {
        this.milestoneStatus = milestoneStatus;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "PLANNED_START_DATE", length = 7)
    public Date getPlannedStartDate() {
        return this.plannedStartDate;
    }

    public void setPlannedStartDate(Date plannedStartDate) {
        this.plannedStartDate = plannedStartDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "PLANNED_END_DATE", length = 7)
    public Date getPlannedEndDate() {
        return this.plannedEndDate;
    }

    public void setPlannedEndDate(Date plannedEndDate) {
        this.plannedEndDate = plannedEndDate;
    }

    @Column(name = "PLANNED_DURATION", length = 50)
    public String getPlannedDuration() {
        return this.plannedDuration;
    }

    public void setPlannedDuration(String plannedDuration) {
        this.plannedDuration = plannedDuration;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "ACTUAL_START_DATE", length = 7)
    public Date getActualStartDate() {
        return this.actualStartDate;
    }

    public void setActualStartDate(Date actualStartDate) {
        this.actualStartDate = actualStartDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "ACTUAL_END_DATE", length = 7)
    public Date getActualEndDate() {
        return this.actualEndDate;
    }

    public void setActualEndDate(Date actualEndDate) {
        this.actualEndDate = actualEndDate;
    }
}
